package com.copm.ifm.servers.sys.mapper;

import com.copm.ifm.servers.sys.dto.SysMenusCustomDTO;
import com.copm.ifm.servers.sys.dto.SysProjectDTO;
import com.copm.ifm.servers.sys.entity.SysCategoryType;
import com.copm.ifm.servers.sys.entity.SysMenusCustom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.copm.ifm.servers.sys.vo.SysCategoryTypeVO;
import com.copm.ifm.servers.sys.vo.SysMenusCustomVO;
import com.copm.ifm.servers.sys.vo.SysProjectVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 自定义菜单表 Mapper 接口
 * </p>
 *
 * @author tp
 * @since 2021-01-05
 */
public interface SysMenusCustomMapper extends BaseMapper<SysMenusCustom> {

    List<SysMenusCustom> getEquTypeTree(@Param("enabled")int enabled);

    SysMenusCustomVO selectParentEquById(@Param("parentEquId")Integer parentEquId);

    Integer selectMaxSeq(@Param("parentPath")String parentPath,@Param("level")int level);

    SysMenusCustom checkEquCode(@Param("code")String code);

    SysMenusCustom checkEquName(@Param("name")String name,@Param("parentPath")String parentPath);

    String selectMaxPath(@Param("parentPath")String parentPath);

    int updateLeafNode(SysMenusCustom temp);

    List<SysMenusCustom> selectEquipmentTypebyName
            (@Param("name")String name,@Param("parentPath")String parentPath);

    List<SysMenusCustom> selectEquipmentTypebyLevel
            (@Param("name")String name,@Param("level")Integer level);

    List<SysMenusCustom> selectHaveChild(String path);

    SysMenusCustom selectEquipmentTypeNotEnable(String path);

    SysMenusCustom selectEquipmentTypeByParentpath(String parentPath);

    int countById(@Param("id")Integer id);

    int selectByParentPath(String parentPath);

    int updateByParentPath(SysMenusCustom categoryType);

    int updateDelete(@Param("id")Integer id);

    List<SysMenusCustom> menuListByName(String menuName);

    List<SysMenusCustomVO> selectForPage(SysMenusCustomDTO param);

    List<String> selectCodeList(@Param("code")String code);

    SysMenusCustomVO selectVoById(@Param("id")int id);
}
